package com.lzb.common.constant.favourite;

import com.lzb.common.constant.CommonConstantValues;

public class ConstantValues {

	/*
	 * 
	a.用户-朋友圈映射:
	    数据结构:zset
	    key = `user-moment-mapping:` + userUUID
	    value = `moment:` + momentUUID
	    score = createDate + createTime
	b.朋友圈-点赞用户id映射:
	    数据结构:zset(可实现时间倒序)
	    key = `moment-favourite-user:` + momentUUID
	    value = `user:` + userUUID
	    score = currentDateTime
	c.session缓存:
	    数据结构:hash
	    key = sessionId or userUUID ? 
	    value = currentLoginedUser
	d.结果集缓存:
	    数据结构:string
	    key = 包名.类名.方法名.[参数]
	    value = json序列化的结果集
	e.主页只显示最新的20条朋友圈:
	    数据结构:list
		key = theNewestTwentyMoment
		value = [momentUUID...]
	f.朋友圈信息应存到缓存（AOP）:
		数据结构:hash
		key = `moments:` + momentUUID
		value = {content : "123", uuid : "456"} 
	 * */
	
	public static final String DOMAIN_USER = "users";
	public static final String DOMAIN_MOMENT = "moments";
	public static final String USER_MOMENT_MAPPING = "user-moment-mapping" + CommonConstantValues.REDIS_SPLITTER + DOMAIN_USER;
	public static final String MOMENT_FAVOURITE_USER_MAPPING = "moment-favourite-user-mapping" + CommonConstantValues.REDIS_SPLITTER + DOMAIN_MOMENT;
	public static final String RESULT_SET = "result_set";
	public static final String THE_NEWEST_MOMENT_KEY = "theNewestTwentyMoment";
	public static final int THE_NEWEST_MOMENT_SIZE = 20;
}
